from applications.extensions import db
import datetime

class UserDep(db.Model):
    # 定义用户部门表
    __tablename__ = 'user_dep'

    # ID
    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='ID')
    # 父ID
    pid = db.Column(db.Integer, nullable=False, default=0, comment='父ID')
    # 标题
    title = db.Column(db.String(50), nullable=True, comment='标题')
    # 排序
    sort = db.Column(db.Integer, nullable=True, comment='排序')
    # 领导
    leader = db.Column(db.String(250), nullable=True, comment='领导')
    # 状态
    status = db.Column(db.Integer, nullable=True, comment='状态')
    # 简介
    intro = db.Column(db.Text, nullable=True, comment='简介')
    # 更新时间